package com.meituan.sdk.model.ddzhkh.shangpin.productUnitedUpdateStock;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 商品快速改库存（通用）
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/shangpin/united/update/stocks",
    businessId = 59,
    apiVersion = "10085",
    apiName = "product_united_update_stock",
    needAuth = true
)
public class ProductUnitedUpdateStockRequest implements MeituanRequest<ProductUnitedUpdateStockResponse> {
    /**
    * <p data-diff-id="ct-diff-id-044ac89e-db0d-4a85-820c-b1b0d77b6b39">商品id</p>
    */
    @NotNull(message = "productId不能为空")
    @SerializedName("productId")
    private Long productId;
    /**
    * <p data-diff-id="ct-diff-id-6187ed21-07b9-4d50-a7cf-39f56a8bdd41">sku库存</p>
    */
    @NotEmpty(message = "skuStocks不能为空")
    @SerializedName("skuStocks")
    private List<SkuStockParam> skuStocks;

    public Long getProductId() {
        return productId;
    }
    public void setProductId(Long productId) {
        this.productId = productId;
    }
    public List<SkuStockParam> getSkuStocks() {
        return skuStocks;
    }
    public void setSkuStocks(List<SkuStockParam> skuStocks) {
        this.skuStocks = skuStocks;
    }


    @Override
    public MeituanResponse<ProductUnitedUpdateStockResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<ProductUnitedUpdateStockResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "ProductUnitedUpdateStockRequest{" + "productId=" + productId + "," + "skuStocks=" + skuStocks + "}";
    }
}
